<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // 同步回调函数
        let arr = [1,2,3,4]
        arr.forEach(element => {
            console.log(element)
        });
        console.log("forEach()函数之后");
        //异步回调函数
        setTimeout(()=>{
            console.log("setTime函数")
        },0);
        console.log("setTime()函数之后")
    </script>
</body>
</html>